# Maintainer: Barnabas Czeman <barnabas.czeman@postmarketos.org>
pkgname=soc-qcom-msm89x7
pkgdesc="Common package for Qualcomm MSM89x7 devices"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="BSD-3-Clause"
arch="aarch64"
options="!check !archcheck !tracedeps pmb:cross-native"
depends="swclock-offset"
subpackages="
	$pkgname-gpu
"

source="
	adreno-quirks.sh
"

package() {
	mkdir -p $pkgdir
}

gpu() {
	pkgdesc="Various GPU workarounds for Adreno 308 and 505"
	install_if="$pkgname=$pkgver-r$pkgrel mesa-dri-gallium"

	install -Dm644 "$srcdir"/adreno-quirks.sh \
		"$subpkgdir"/etc/profile.d/adreno-quirks.sh
}

sha512sums="
d54065bd6e069dd49349fc53960de42fa43438c4519e90a44d89ab6fdf74978301b1d3865bb4d51130806bf8680ce34532ad97b2729e78208745a1aa4bbac904  adreno-quirks.sh
"
